package gui;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;

import javax.swing.JPanel;

public class BackgroundPanel extends JPanel
{
	private BufferedImage backgroundImage;

	public BackgroundPanel(BufferedImage backgroundImage)
	{
		this.backgroundImage = backgroundImage;
		setPreferredSize(new Dimension(525, 525));
	}

	@Override
	protected void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		if (null != backgroundImage)
		{
			g.drawImage(backgroundImage, 0, 0, null);
		}
	}

}
